import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:largefriends/res/lf_color.dart';
import 'package:largefriends/res/lf_double_ext.dart';
import 'package:shimmer/shimmer.dart';

import '../../res/lf_fonts.dart';
import '../../res/lf_text_style.dart';

class LfBlockedLoading extends StatelessWidget {
  const LfBlockedLoading({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Shimmer.fromColors(
      baseColor: color8F8F8F,
      highlightColor: color514F62.withAlpha(10),
      period: const Duration(seconds: 1),
      child: Padding(
        padding: EdgeInsets.symmetric(horizontal: 10.w),
        child: SingleChildScrollView(
          physics: const NeverScrollableScrollPhysics(),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              _item(),
              _item(),
              _item(),
              _item(),
              _item(),
              _item(),
              _item(),
            ],
          ),
        ),
      ),
    );
  }

  _item() {
    return Container(
      margin: EdgeInsets.symmetric(vertical: 6.h),
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Container(
            decoration:
                BoxDecoration(color: color210215, borderRadius: 4.r.radius),
            height: 60.r,
            width: 60.r,
          ),
          8.w.sbw,
          Expanded(
              child: Container(
            decoration:
                BoxDecoration(color: color210215, borderRadius: 4.r.radius),
            height: 10.r,
          )),
          8.w.sbw,
          InkWell(
            child: Container(
              decoration:
                  BoxDecoration(color: color210215, borderRadius: 4.r.radius),
              padding: EdgeInsets.symmetric(vertical: 2.h, horizontal: 5.w),
              child: Text(
                'Unblock',
                style: lfTextStyle(
                    sp: 15.sp, fontFamily: fontMedium, color: colorFEFEFE),
              ),
            ),
            onTap: () {},
          )
        ],
      ),
    );
  }
}
